Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

[Device][Backend] refactor: extract methods and deviceguard #4

Merged
merged 16 commits into from
Jul 17, 2024

Conversation

shink
Copy link
Collaborator

@shink shink commented Jul 12, 2024

migrated from https://github.com/Ascend/torch_npu/pull/12
part of: #8

  1. 抽取 DeviceGuard
  2. 抽取 sys_ctl 方法
  3. 删除 torch_npu.utilization() 查询综合利用率的 API
  4. 重构 NPUFunctions
  5. 设备索引统一使用 c10::DeviceIndex

TODO:

  1. 抽取 CANN API 差异适配层

@shink shink self-assigned this Jul 12, 2024
@github-actions github-actions bot added the backend C++ implementation label Jul 12, 2024
@github-actions github-actions bot added the ci/cd CI/CD label Jul 12, 2024
csrc/npu/NPUFunctions.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the frontend Python implementation label Jul 16, 2024
@shink shink marked this pull request as draft July 16, 2024 12:39
@shink shink marked this pull request as ready for review July 17, 2024 02:07
@shink shink requested a review from Zhenbin-8 July 17, 2024 02:47
csrc/npu/NPUFunctions.h Outdated Show resolved Hide resolved
@shink
Copy link
Collaborator Author

shink commented Jul 17, 2024

抽取适配层在下一个 PR 中修改,此 PR 仅完成许多小细节更改

@FFFrog FFFrog merged commit 4045d05 into main Jul 17, 2024
4 checks passed
@shink shink deleted the jyh/device/2 branch July 17, 2024 08:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend C++ implementation ci/cd CI/CD component/device frontend Python implementation unit test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants